<% if Spree::AuthenticationMethod.active_authentication_methods? %>
  <% @body_id = 'login' %>
  <div id="existing-customer">
    <% if spree_current_user.user_authentications %>
      <% unless spree_current_user.user_authentications.empty? %>
        <h4><%= Spree.t(:you_have_signed_in_with_these_services) %></h4>
        <div class="authentications">
          <% for user_authentication in spree_current_user.user_authentications %>
            <div class="authentication row">
              <div class="provider col-xs-5 col-md-2">
                <%= content_tag(:i, '', class: "icon-spree-#{user_authentication.provider.to_url}-circled") %>
                <%= user_authentication.provider %>
              </div>
              <div class="uid col-xs-5 col-md-3">
                <%= user_authentication.uid %>
              </div>
              <div class="col-xs-2 text-center">
                <%= link_to user_authentication, data: { confirm: "#{Spree.t(:remove_authentication_option_confirmation)}" }, method: :delete, class: 'btn btn-default' do %>
                  <%= content_tag(:span, '', class: 'glyphicon glyphicon-minus-sign') %>
                <% end %>
              </div>
            </div>
          <% end %>
        </div>
      <% end %>
    <% end %>
    <% if Spree::AuthenticationMethod.available_for(spree_current_user).exists?  %>
      <br />
      <p>
        <strong><%= Spree.t(:add_another_service) %></strong>
      </p>
      <%= render 'spree/shared/social' %>
    <% end %>
  </div>
  <div class="clear"></div>
<% end %>
